package com.wjr.controller;

import com.wjr.mvc.ResponseBody;
import com.wjr.mvc.ResponseView;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.net.http.HttpResponse;

/**
 * @Author: wjr
 * @Description: 模拟用户登录注册的controller,用于测试自定义的mvc框架是否可用
 * @Date Created in  2020-09-09 16:47
 * @Modified By:
 */
public class UserController {
    /**
      * @Description 模拟用户登录的方法
      * @param
      * @Return java.lang.String 返回TEXT类型的信息
      * @Author wjr
      * @Date Created in 2020/9/9 16:49
      */
    @ResponseBody("/login.do")
    public String login(HttpServletRequest request, HttpServletResponse response){
        return "login success";
    }
    /**
      * @Description 模拟用户注册的方法
      * @param
      * @Return java.lang.String 返回注册页面
      * @Author wjr
      * @Date Created in 2020/9/9 16:51
      */
    @ResponseView("/reg.do")
    public String reg(HttpServletRequest request, HttpServletResponse response){
        return "success.jsp";
    }
}
